{
	template:`
	<a-page-header title="会员日设置"  >
		<template #extra>
			<a-button type="primary" @click="save">保存</a-button>
		</template>
		<a-card :hoverable="true" :bodyStyle="{padding:'20px 20px 0'}">
			<a-form class="index-form" :wrapper-col="{span:24}">
				<a-row :gutter="10">
					<a-col :span="8">
						<a-form-item label="类型" class="index-form-item">
							<a-radio-group v-model:value="model.memberDayType" :options="dictOptions('m.member.manage.model.AppSetting!memberDayType')" />
						</a-form-item>
					</a-col>
					<template v-if="model.memberDayType=='N'">
                        <a-col :span="16">
                            <a-alert message="当前设置无会员日" type="success" />
                        </a-col>
					</template>
					<template v-else>
                        <a-col v-if="model.memberDayType=='A'" :span="7">
                            <a-form-item label="每月" class="index-form-item-sm">
                                <a-select v-model:value="model.memberDayNo"  :options="dictOptions('m.member.manage.model.AppSetting!memberDayNo')" mode="multiple" show-arrow show-search :filter-option="selectFilter"/>
                            </a-form-item>
                        </a-col>
                        <a-col v-if="model.memberDayType=='B'" :span="7">
                            <a-form-item label="每周" class="index-form-item-sm">
                                <a-select v-model:value="model.memberWeekNo"  :options="dictOptions('m.member.manage.model.AppSetting!memberWeekNo')" show-search :filter-option="selectFilter"/>
                            </a-form-item>
                        </a-col>
                        <a-col :span="9"></a-col>
                        <a-col :span="8">
                            <a-form-item label="积分倍数" class="index-form-item">
                                <a-input-number v-model:value="model.pointRate" addon-after="%" :max="500" :min="100" :precision="0"/>
                            </a-form-item>
                        </a-col>
                        <a-col :span="16">
                            <a-form-item class="index-form-item">会员日当天积分翻倍（范围可设置100~500），例如：消费66.6元，非会员日积分<span class="text-red">+66</span>，会员日翻倍后<span class="text-red text-lg">+{{formatNumber(66*model.pointRate/100,"0")}}</span>。</a-form-item>
                        </a-col>
                        <a-col :span="8">
                            <a-form-item label="优惠比例" class="index-form-item">
                                <a-input-number v-model:value="model.discount" addon-after="%" :max="100" :min="0" :precision="0"/>
                            </a-form-item>
                        </a-col>
                        <a-col :span="16">
                            <a-form-item class="index-form-item">会员日当天下单额外优惠（范围可设置0~100），例如：订单最终金额88.8元，会员日只需<span class="text-red text-lg">{{formatNumber(88.8*(100-model.discount)/100,"0.00")}}元</span>。</a-form-item>
                        </a-col>
					</template>
				</a-row>
			</a-form>
		</a-card>
	</a-page-header>
	`,
	props: ['localeZh','param','parentVue'],
	data:function(){
		return {
			model:{}
		};
	},
	mounted(){
	    this.model=this.param.model;
	},
	methods:{
		save:function(){
			this.requestData('action/member/manage/appSetting/doSave',
				{model:this.model},
				data=>{
					if(!data.code){
						this.$message.success(data.msg);
						this.back(true);
					}else{
						this.$message.error(data.msg);
					}
				}
			);
		},
	}
}